export const request=function(params){
  wx.showLoading({
    title: '加载中',
    mask:true
  })
  return new Promise(function(resolve,reject){
     wx.request({
       ...params,
       success:function(res){
          resolve(res);
       },
       fail:function(err){
        reject(err);
       },
       complete:function(){
        wx.hideLoading();
       }
     })
  })
}